package cn.poka.device;

/**
 * 定义GPIO
 * @author digl
 */
public class GPIO {

//	private IA10gpioService gpioService = null;
	private int ioID;

	public GPIO(int ID) {
		super();
		ioID = ID*10;
//		gpioService = IA10gpioService.Stub.asInterface(ServiceManager.getService("A10gpio"));//Gpio 封装到jar包的文件 bcpkix-jdk15on-152.jar
	}

	public void setGPIO(int val) {
		try {
//			gpioService.setVal(ioID+val);
		} catch (Exception e) {
			System.out.println("remoteException");
		}
	}

	public int getGPIO() {
		int i = 1;
		try {
//			i = gpioService.getVal()-ioID;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return i;
	}

}
